;export default function () {
    var ls = localStorage.getItem("usr_info");
    if (ls !== null) {
        var ls_list = JSON.parse(ls);
        var status = false;
        var usr = "";
        $.each(ls_list, function (index, item) {
            if (item.status == "success") {
                status = true;
                usr = item.usr;
                return false;
            }
        });
        if (status) {
            var html = `欢迎您<span class="s-username">${usr}</span>， <a href="javascript:void(0);" class="logout" usr=${usr}>退出</a>`;
            $(".js-login-info").html(html);
            $(".no-login").attr("style", "display:none;");
            $(".hav-log").attr("style", "display:block");
            $(".user-hd").html(`你好，${usr}`);
            $(".user-rank").removeClass("none");
            $(".sign-wrap").addClass("none");
        }
    }
    $(".w-login").on("click", ".logout", function () {
        // alert($(this).attr("usr"));
        // alert(location.href);
        var logout_usr = $(this).attr("usr");
        var ls = localStorage.getItem("usr_info");
        var ls_list = JSON.parse(ls);
        $.each(ls_list, function (index, item) {
            if (logout_usr == item.usr) {
                ls_list[index].status = "";
                localStorage.setItem("usr_info", JSON.stringify(ls_list));
                location.reload();
                return false;
            }
        });
    });
}